<template>
    <div class="file-attachment-warp">
        <a-card title="审批信息">
            <Detail :data-source="model.info" :layout="detailLayout" labelWidth="150px"></Detail>
            <a-table :dataSource="model.list" :columns="columns" :pagination="false"/>
        </a-card>
    </div>
</template>

<script lang='ts' setup>
    import { ref } from 'vue';
    import Detail from '@/components/detail/index.vue';
    defineOptions({
        // 审批信息
        name: 'FileApproveInfo'
    });
    const model = defineModel({
        type: Object, // 类型检查
        required: true, // 是否必填
        // 默认值
        default: {}, 
    });
    const detailLayout = ref<any[][]>([
        [{label: '工作流名称:', prop:'workflowName', labelAlign: 'right' }, {label: '审批类型:', prop:'approveType', labelAlign: 'right' }],
    ]);
    const columns = ref([
        { title: '审批步骤', dataIndex: 'approveLevel', key: 'approveLevel'},
        { title: '步骤名称', dataIndex: 'approveName', key: 'approveName'},
        { title: '审批状态', dataIndex: 'approveStatus', key: 'approveStatus'},
        { title: '审批开始时间', dataIndex: 'approveStartTime', key: 'approveStartTime'},
        { title: '审批时间', dataIndex: 'approveDate', key: 'approveDate'},
        { title: '审批人', dataIndex: 'approveUser', key: 'approveUser'},
        { title: '审批备注', dataIndex: 'approveRemark', key: 'approveRemark'},
    ]);
</script>

<style scoped lang="less">
</style>